package com.iis.hrms.persistence;

import javax.persistence.*;
import java.io.Serializable;
import java.math.BigDecimal;

/**
 * The persistent class for the question_history database table.
 */
@Entity
@Table(name = "question_history")
@NamedQueries({
        @NamedQuery(name = "QuestionHistory.findAll", query = "SELECT q FROM QuestionHistory q"),
        @NamedQuery(name = "QuestionHistory.findById", query = "SELECT q FROM QuestionHistory q WHERE q.id = :id"),
        @NamedQuery(name = "QuestionHistory.findByNumber", query = "SELECT q FROM QuestionHistory q WHERE q.number = :number")})
public class QuestionHistory implements Serializable {
    private static final long serialVersionUID = 1L;

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(unique = true, nullable = false)
    private String id;

    @Column(nullable = false, precision = 10, scale = 2)
    private BigDecimal number;

    // bi-directional many-to-one association to JobseekerHistory
    @ManyToOne
    @JoinColumn(name = "id_jobseeker_history", nullable = false)
    private JobseekerHistory jobseekerHistory;

    // bi-directional many-to-one association to Question
    @ManyToOne
    @JoinColumn(name = "id_question", nullable = false)
    private Question question;

    public QuestionHistory() {
    }

    public String getId() {
        return this.id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public BigDecimal getNumber() {
        return this.number;
    }

    public void setNumber(BigDecimal number) {
        this.number = number;
    }

    public JobseekerHistory getJobseekerHistory() {
        return this.jobseekerHistory;
    }

    public void setJobseekerHistory(JobseekerHistory jobseekerHistory) {
        this.jobseekerHistory = jobseekerHistory;
    }

    public Question getQuestion() {
        return this.question;
    }

    public void setQuestion(Question question) {
        this.question = question;
    }

}